1. Field of the Invention
The present invention relates to a tone correction technique for captured images.
2. Description of the Related Art
There is known a technique of converting the luminance signals of a captured image and performing tone correction for the resultant signals to obtain an image with desired brightness. A captured image in a so-called backlit scene, in which the brightness of an object is considerably lower than that of a background, results in a dark object. A desired image is therefore obtained by performing tone correction to increase the brightness of the low-luminance portion. More specifically, as shown in FIG. 18, tone correction is performed to apply a higher gain to a captured image as the luminance of the image decreases. In this specification, such a tone correction technique is called partial contrast correction.
A problem in partial contrast correction is that applying a high gain to a low-luminance portion may decrease the light/dark contrast of the overall image. For example, when partial contrast correction is performed in a backlit scene with a dark object, the shade of the face region of a person is eliminated to result in a flat, low-contrast face. In addition, the hair region of a person with black hair is lower in luminance than the face region, and hence a high gain is applied to the hair region, resulting in an unnaturally bright region looking like white hair.
Under these circumstances, in order to solve the problem of a decrease in contrast, Japanese Patent Laid-Open No. 2011-100204 has proposed a technique of generating an image which secures the necessary brightness while imposing a limitation so as to prevent a low-luminance portion from becoming excessively bright by setting the upper limit value of the gain to be applied.
However, the related art disclosed in Japanese Patent Laid-Open No. 2011-100204 described above includes no description about gain control when a person exists. For this reason, this technique has the effect of reducing a decrease in contrast of an overall image, but cannot obtain an image with a person appearing correctly when a person is captured as an object.